package com.gzc.just.play.last.war.loginserver.sdk.model;

/**
 * 登录响应模型
 */
public class LoginResponse {
    private int requestId;
    private boolean success;
    private String message;
    private SDKUser user;
    
    public LoginResponse() {
    }
    
    public LoginResponse(int requestId, boolean success, String message) {
        this.requestId = requestId;
        this.success = success;
        this.message = message;
    }
    
    public LoginResponse(int requestId, boolean success, String message, SDKUser user) {
        this.requestId = requestId;
        this.success = success;
        this.message = message;
        this.user = user;
    }
    
    /**
     * 创建成功的登录响应
     */
    public static LoginResponse success(int requestId, SDKUser user) {
        return new LoginResponse(requestId, true, "Login successful", user);
    }
    
    /**
     * 创建失败的登录响应
     */
    public static LoginResponse failure(int requestId, String message) {
        return new LoginResponse(requestId, false, message);
    }
    
    // Getters and Setters
    public int getRequestId() {
        return requestId;
    }
    
    public void setRequestId(int requestId) {
        this.requestId = requestId;
    }
    
    public boolean isSuccess() {
        return success;
    }
    
    public void setSuccess(boolean success) {
        this.success = success;
    }
    
    public String getMessage() {
        return message;
    }
    
    public void setMessage(String message) {
        this.message = message;
    }
    
    public SDKUser getUser() {
        return user;
    }
    
    public void setUser(SDKUser user) {
        this.user = user;
    }
    
    @Override
    public String toString() {
        return "LoginResponse{" +
                "requestId=" + requestId +
                ", success=" + success +
                ", message='" + message + '\'' +
                ", user=" + user +
                '}';
    }
}